package com.car.loan.project.xr.util.vo.report;

import com.car.loan.common.utils.StringUtils;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import java.time.LocalDate;
import lombok.Data;

/**
 * @author huangding
 * @date 2020/2/19 18:41
 */
@Data
public class SettleInfoVo {

    @ApiModelProperty("业务编号")
    private String businessNo;

    @ApiModelProperty("客户名称")
    private String customerName;

    @ApiModelProperty("车辆类型")
    private String carType;

    @ApiModelProperty("车辆性质")
    private String carNature;

    @ApiModelProperty("分期金额")
    private Double installmentAmount;

    @ApiModelProperty("合同车价")
    private Double sellAmount;

    @ApiModelProperty("融资金额")
    private Double financingAmount;

    @ApiModelProperty("合作商户")
    private String dealerName;

    @ApiModelProperty("期数")
    private Integer term;

    @ApiModelProperty("银行名称")
    private String bankName;

    @ApiModelProperty("部门名称")
    private String deptName;

    @ApiModelProperty("业务员")
    private String adminName;

    @ApiModelProperty("执行费率")
    private Double rate;

    @ApiModelProperty("付款审批时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDate paymentAuditTime;

    @ApiModelProperty("付款日期")
    private String advanceDate;

    @ApiModelProperty("放贷日期")
    private String lendDate;

    @ApiModelProperty(value = "结算日期 yyyy-MM-dd", required = true)
    private String settleDate;

    @ApiModelProperty("结算费率")
    private Double settleRate;

    @ApiModelProperty(value = "应结金额")
    private Double shouldAmount;

    @ApiModelProperty("结算扣罚金额")
    private Double salesmanFinedAmount;

    @ApiModelProperty("实结金额")
    private Double salesmanRebateAmount;

    @ApiModelProperty("结算账户名")
    private String salesmanBankAccountName;

    @ApiModelProperty("结算开户行")
    private String salesmanBankName;

    @ApiModelProperty("结算账号")
    private String salesmanBankAccountNo;

    @ApiModelProperty("车辆上牌日期")
    private String registDate;

    @ApiModelProperty("抵押日期")
    private String mortgageDate;

    @ApiModelProperty("车系型号")
    private String carName;


    public String getCarNature() {
        if (StringUtils.isNotEmpty(carNature)) {
            if ("1".equals(carNature)) {
                return "新车";
            } else if ("2".equals(carNature)) {
                return "二手车";
            } else {
                return "存量车";
            }
        }
        return carNature;
    }


}
